﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Mvc.XForms.Tests {
	public class TestModel {
		public int ID { get; set; }
		public string Name { get; set; }
		public DateTime Date { get; set; }

		public static List<TestModel> AsList() {
			var list = new List<TestModel> {
					new TestModel { ID = 1, Name = "Name1", Date = DateTime.Now },
					new TestModel { ID = 2, Name = "Name2", Date = DateTime.Now },
					new TestModel { ID = 3, Name = "Name3", Date = DateTime.Now },
					new TestModel { ID = 4, Name = "Name4", Date = DateTime.Now },
					new TestModel { ID = 5, Name = "Name5", Date = DateTime.Now }
				};

			return list;
		}

		public static IQueryable<TestModel> AsQueryable() {
			return AsList().AsQueryable();
		}
	}
}